﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SectionList.aspx.cs" Inherits="BBS_BbsManage_SectionList" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
   <title>讨论区管理</title>
 <link href="../../css/Css.css" rel="stylesheet" type="text/css" />  
 <script src="../../JS/Common.js" type ="text/javascript"></script>
 <!--#include file="../../JS/Button.js"-->
 <script src="../../JS/calendar.js" type ="text/javascript"></script> 
    <script language ="javascript" type ="text/javascript" >
  function document.onkeydown()     
  {
      var   e=event.srcElement; 
      if(event.keyCode==13)
      {
         return   false; 
      }
  }
  
  function Edit_click()
    {
    var HiddenID=document.getElementById('HiddenID').value;
    if(isNull(HiddenID))
    {
        alert("请选择一条记录!");
        return false;
    }
    var url="SectionEdit.aspx?EditStatus=2&ID=" + HiddenID;
    
     //var sFeatures='height=400, width=600, top=200, left=250,toolbar=0, menubar=0, scrollbars=yes, resizable=1, location=0, status=0';
     window.open(url,"_self","");
     }
    </script>
    
    
</head>
<body style ="background-image :url('../../images/hit_bg.gif');">
    <form id="form1" runat="server">
    <div>
    <table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="5"></td>
      </tr>
    </table>
    <table width="95%" border="0" cellpadding="0" cellspacing="0" class="table" align="center" >
      <tr> 
        <td colspan="6" align="center" valign="top">
   <!--按钮开始-->     
       <table cellpadding="0" cellspacing="0" width="95%" align="center">
        <tr>
            <td><b>当前位置：</b><asp:Label ID="Indicator" runat ="server" ForeColor ="#ff0000" ></asp:Label></td>
            <td align="right" style="height: 32px; width:200;" nowrap="nowrap">
                <asp:Label ID="LabMessage" runat="server" ForeColor="Red"></asp:Label>
                <input type="hidden" id="HiddenID" name="HiddenID" runat="server" />
                <input type="hidden" id="HiddenWidth" name="HiddenWidth" value = "700"  runat="server" />
                <input type="hidden" id="HiddenHeight" name="HiddenHeight" value="500"  runat="server" />
                <input type="hidden" id="HiddenEditPageName" name="HiddenEditPageName"  value="HelpEdit.aspx"  runat="server" />
                <input id="Btn_1" runat="server" type="button" onclick="javascript:window.location.href='SectionEdit.aspx?EditStatus=1';" value="增加"  class="button02"  />
                <input id="Btn_2" runat="server" type="button" value="修改"  class="button02"  onclick="Edit_click();"  />
                 
                <input id="Btn_3" runat="server" type="button" value="删除"  class="button03" onserverclick="Btn_3_ServerClick"  />
                
                <asp:Button ID="btnRefresh" runat="server" Text="Button" Width="0px" Height="0px" />
            </td>
        </tr>
    </table>
   <!--按钮结束-->   
    
   <!--搜索开始-->
      <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="b">
		<tr> 
		  <td  valign="top">	        
			<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
			  <tr bgcolor="C3DCF6" style ="height :40;"> 
				<td>&nbsp;&nbsp;讨论组名称：<asp:TextBox ID="GroupName" runat="server"  TabIndex="3" Width="120"></asp:TextBox>
				    &nbsp;&nbsp;讨论区名称：<asp:TextBox ID="SectionName" runat="server"  TabIndex="3" Width="120"></asp:TextBox>				
				          <asp:Button ID="btnSearch" runat="server" cssclass="button02" Text="查询" />
				  </td>
			  </tr>
			</table>
		   </td>
		</tr>
	</table>
	<!--搜索结束-->

  <!--列表开始-->
    <asp:GridView ID="GridView1" runat="server" Width="98%" DataKeyNames="SectionID" OnRowDataBound="GridView1_RowDataBound"
        ForeColor="#333333" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True"  PageSize="15" EmptyDataText="没搜索到相匹配的数据" >
        
    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
    <RowStyle BackColor="White" ForeColor="#333333" Height="22px" />            
    <PagerStyle BackColor="White" ForeColor="#333333" HorizontalAlign="Right" Wrap="False" />
    <HeaderStyle BackColor="#99CCFF" Font-Bold="True" ForeColor="Black" Height="23px" />
    <AlternatingRowStyle BackColor="AliceBlue" />
        <PagerTemplate>
            <table width="100%" datapagesize="5">
                <tr>
                     <td width="70%" align="right">
                        <img src="../../images/BeginPage.gif" alt ="首页" /><asp:LinkButton CommandName="Page" CommandArgument="First" ID="linkBtnFirst" runat="server">首页</asp:LinkButton>
                        <img src="../../images/PrePage.gif" alt ="上一页" /><asp:LinkButton CommandName="Page" CommandArgument="Prev" ID="linkBtnPrev" runat="server">上一页</asp:LinkButton>
                        <img src="../../images/NextPage.gif" alt ="下一页" /><asp:LinkButton CommandName="Page" CommandArgument="Next" ID="linkBtnNext" runat="server">下一页</asp:LinkButton>
                        <img src="../../images/EndPage.gif" alt ="尾页" /><asp:LinkButton CommandName="Page" CommandArgument="Last" ID="linkBtnLast" runat="server">尾页</asp:LinkButton>
                        <asp:TextBox ID="txtGoPage" class="INPUT" runat="server" MaxLength="5" Width="15px"></asp:TextBox>
                        <asp:LinkButton ID="linkBtnGo" runat="server" OnClick="linkBtnGo_Click">跳转</asp:LinkButton>
                        <asp:Label ID="labMessage" runat="server" ForeColor="Red"></asp:Label></td>
                    <td width="30%" align="right">
                        <asp:Label ID="CurrentPageLabel" runat="server" ForeColor="Blue" Text="1/5页 共75条"></asp:Label>
                    </td>
                </tr>
            </table>
        </PagerTemplate>
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <input id="check" runat="server" type="checkbox" value='<%# Eval("SectionID") %>' />
                </ItemTemplate>
                <HeaderTemplate>
                    <input id="checkAll" title="全选" onclick="javascript:CheckAll(this);" runat="server"
                        type="checkbox" />
                </HeaderTemplate>
                <ItemStyle Width="5%" HorizontalAlign="center"/>
            </asp:TemplateField>
            <asp:BoundField DataField="GroupName" HeaderText="讨论组名称" SortExpression="GroupName">
                <ItemStyle Width="15%" HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="SectionName" HeaderText="讨论区名称" SortExpression="SectionName">
                <ItemStyle Width="15%" HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="Descr" HeaderText="描述" SortExpression="Descr">
                <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="Master" HeaderText="版主" SortExpression="Master">
                <ItemStyle Width="8%" HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="Ord" HeaderText="排序" SortExpression="Ord">
                <ItemStyle Width="8%" HorizontalAlign="Left" />
            </asp:BoundField>  
            <asp:BoundField DataField="VisiableName" HeaderText="是否有效" SortExpression="VisiableName" >
                <ItemStyle Width="8%" HorizontalAlign="Left" />
            </asp:BoundField>
        </Columns>
    </asp:GridView>
   <!--列表结束-->   
    <table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td height="10"></td>
        </tr>
    </table>
    
    </td>
      </tr>
    </table>
   <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td valign="top" style ="background-image :url('../../images/cxdimain.gif');">
                <img src="../../images/cxdileft.gif" width="20" height="15" alt ="" /></td>
            <td style ="background-image :url('../../images/cxdimain.gif');">
                <div align="right"><img src="../../images/cxdiright.gif" width="20" height="15" alt ="" /></div>
            </td>
        </tr>
    </table>
    </div>
    </form>
</body>
</html>
